/*
 * @Author: early-autumn
 * @Date: 2020-05-22 14:41:26
 * @LastEditors: early-autumn
 * @LastEditTime: 2020-05-29 15:53:51
 */

import request from '@/utils/request'

// 查询预约列表
export function listAppointment(query) {
  return request({
    url: '/erp/appointment/list',
    method: 'get',
    params: query,
  })
}

// 查询预约详细
export function getAppointment(id) {
  return request({
    url: '/erp/appointment/' + id,
    method: 'get',
  })
}

// 新增预约
export function addAppointment(data) {
  return request({
    url: '/erp/appointment',
    method: 'post',
    data: data,
  })
}

// 修改预约
export function updateAppointment(data) {
  return request({
    url: '/erp/appointment',
    method: 'put',
    data: data,
  })
}

// 删除预约
export function delAppointment(id) {
  return request({
    url: '/erp/appointment/' + id,
    method: 'delete',
  })
}

// 导出预约
export function exportAppointment(params) {
  return request({
    url: '/erp/appointment/export',
    method: 'get',
    params,
  })
}

// 全部预约列表详情
export function allListAppointment(data) {
  return request({
    url: '/erp/appointment/list/all',
    method: 'post',
    data,
  })
}
